package com.zk.iotgateway.domain.param;

import java.io.Serializable;

/**
 * ${DESCRIPTION}
 *
 * @author:mn.m
 * @create 2019-05-05 下午 03:14
 **/
public class IotDispatchDO implements Serializable {
    private static final long serialVersionUID = 8295172230659978211L;
    private String id;
    /*
     * ip地址
     * */
    private String address;
    /*
     * 用户名
     * */
    private String username;
    /*
     * 密码
     * */
    private String password;
    /*
     * 发布确认
     * */
    private String publisherConfirm;

    private boolean publisherConfirms;
    /*
     * 源端口号
     * */
    private String port;
     /*
     * mq端口号
     * */
    private String mqport;
    /*
     * 虚拟主机
     * 默认 /
     * */
    private String virtualHost;
    /*
     * 队列名称
     * */
    private String queueName;
    /*
     * 路由key
     * */
    private String routingKey;
    /*
     * 交换器名称
     * */
    private String exchange;

    /*
     * 交换器类型
     * DIRECT("direct"), FANOUT("fanout"), TOPIC("topic"), HEADERS("headers");
     * */
    private String exchangeType;

    /*
     *
     * 是否启用
     * */
    private String isOpen;



    public IotDispatchDO() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPublisherConfirm() {
        return publisherConfirm;
    }

    public void setPublisherConfirm(String publisherConfirm) {
        this.publisherConfirm = publisherConfirm;
    }

    public boolean isPublisherConfirms() {
        if (this.getPublisherConfirm()!=null){
            if ("1".equals(this.getPublisherConfirm())){
                return true;
            }
        }
        return false;
    }

    public void setPublisherConfirms(boolean publisherConfirms) {
        this.publisherConfirms = publisherConfirms;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getMqport() {
        return mqport;
    }

    public void setMqport(String mqport) {
        this.mqport = mqport;
    }

    public String getVirtualHost() {
        return virtualHost;
    }

    public void setVirtualHost(String virtualHost) {
        this.virtualHost = virtualHost;
    }

    public String getQueueName() {
        return queueName;
    }

    public void setQueueName(String queueName) {
        this.queueName = queueName;
    }

    public String getRoutingKey() {
        return routingKey;
    }

    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    public String getExchange() {
        return exchange;
    }

    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    public String getExchangeType() {
        return exchangeType;
    }

    public void setExchangeType(String exchangeType) {
        this.exchangeType = exchangeType;
    }

    public String getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(String isOpen) {
        this.isOpen = isOpen;
    }
}
